
#ifndef APP_AS8510_PRE 
#define APP_AS8510_PRE 


#ifdef  APP_AS8510_MOD
#define APP_AS8510_EXT
#else
#define APP_AS8510_EXT extern
#endif

#include "bsp_spi.h"


#define APP_AS8510_READ_CURRENT_CNT 6
#define APP_AS8510_READ_VOLTAGE_CNT 6

typedef struct
{
	osThreadId thread_id;
	float i_data[2];
	float v_data[2];
	float i_voltage[2];	
	float v_voltage[2];
	float current[2];
	float voltage[2];
	float temp[2];
	uint16_t i_gain;
	uint16_t i_gain_old;
	uint8_t sw_gain_cnt;
	float v_gain;	
}tAS8510;




APP_AS8510_EXT tAS8510 app_as8510;

APP_AS8510_EXT void app_as8510_init(void);
APP_AS8510_EXT void app_as8510_task(void const * argument);
APP_AS8510_EXT float app_as8510_get_temp(void);






#endif


